home *** CD-ROM | disk | FTP | other *** search
/ Enter 2001 April / EnterCD4.iso / Update / SQL Server SP3 / sql70sp3i.exe / X86 / BINN / res / 1033 / sqlmmc.rll / HTML / VBREPBRW.BAS < prev    next >
Encoding:
BASIC Source File  |  1999-04-12  |  20.0 KB  |  494 lines

  1. ' **********************************************************
  2. '  GenerateBrowseTable
  3. '
  4. '  Generates a chart showing the amount of data and index
  5. '  space used.
  6. ' **********************************************************
  7.  
  8. sub GenerateBrowseTable()
  9.     Dim arrDbs()
  10.     Dim iDbsMax
  11.     Dim iDbsNum
  12.     Dim strDbName
  13.     Dim strDbDesc
  14.     Dim strUniqueID
  15.     Dim strServer
  16.     Dim strDBMSName
  17.     Dim strDBMSVersion
  18.  
  19.     Set theTable = document.all.item("browseTableTable")
  20.     if (theTable.rows.length > 0) then
  21.         Set theTable = nothing
  22.         Exit Sub
  23.     End if
  24.     Set theTable = nothing
  25.  
  26.     Call findDbGuids(arrDbs)
  27.     iDbsMax = UBound(arrDbs) - 1
  28.     For iDbsNum = 0 to iDbsMax
  29.         Call getDbNameDesc(strDbName, strDbDesc, arrDbs(iDbsNum))
  30.         strUniqueID = "p" & arrDbs(iDbsNum)
  31.         strServer = GetDBDataSource(arrDbs(iDbsNum), strDBMSName, strDBMSVersion)
  32.         strDBName = strDBName & ", " & strServer & " [" & strDBMSName & ", " & strDBMSVersion & "]"
  33.         Call GenerateBrowseDbRowDyn(-1, strDbName, strDbDesc, arrDbs(iDbsNum), strUniqueID)
  34.     Next
  35.  
  36.     if (iDbsMax < 0) then
  37.         browseHeader.style.display = "none"
  38.         document.all.BrowseTable.style.display = "none"
  39.         document.all.HorzRule.style.display = "none"
  40.         Dim theTable
  41.         Dim myNewRow
  42.         Dim myNewCell
  43.         Set theTable = document.all.item("browseTableTable")
  44.         Set myNewRow = theTable.insertRow(iRowIndex)
  45.         Call myNewRow.setAttribute("zzType", 1)
  46.         Set myNewCell = myNewRow.insertCell()
  47.         myNewCell.className = "DBTableText"
  48.         myNewCell.width = "100%"
  49.         myNewCell.vAlign = "top"
  50.         myNewCell.innerText = GetResString(76)    ' there is no metadata
  51.         Set myNewCell = nothing
  52.     else
  53.         browseHeader.style.display = ""
  54.         document.all.BrowseTable.style.display = ""
  55.         document.all.HorzRule.style.display = ""
  56.     end if
  57. end sub
  58.  
  59.  
  60. Sub GenerateBrowseDbRowDyn(iRowIndex, strDbName, strDbDesc, strDbGuid, strUniqueID)
  61.     Dim strHTML
  62.     Dim theTable
  63.     Dim myNewRow
  64.     Dim myNewCell
  65.     strDbName = MyHTMLEncode(strDbName)
  66.     strDbDesc = MyHTMLEncode(strDbDesc)
  67.  
  68.     Set theTable = document.all.item("browseTableTable")
  69.     Set myNewRow = theTable.insertRow(iRowIndex)
  70.     Call myNewRow.setAttribute("zzType", 1)
  71.     Set myNewCell = myNewRow.insertCell()
  72.     myNewCell.className = "DBHighlightedTableText"
  73.     myNewCell.width = "70%"
  74.     myNewCell.vAlign = "top"
  75.     strHTML = ""
  76.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  77.     strHTML = strHTML & "      <tr>"
  78.     strHTML = strHTML & "        <td width=""10"" nowrap></td>"
  79.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" width=""12"" id=""" & strUniqueID & """ nowrap><a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwOpen("" & strUniqueID & "")"">+</a></td>"
  80.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" width=""24"" nowrap><img src=""repdb.gif""></td>"
  81.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" valign=""center"">" & strDbName & "</td>"
  82.     strHTML = strHTML & "      </tr>"
  83.     strHTML = strHTML & "     </table>"
  84.     myNewCell.innerHTML = strHTML
  85.     Set myNewCell = nothing
  86.     Set myNewCell = myNewRow.insertCell()
  87.     myNewCell.className = "DBHighlightedTableText"
  88.     myNewCell.vAlign = "top"
  89.     strHTML = ""
  90.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  91.     strHTML = strHTML & "         <td class=""DBHighlightedTableText"" WIDTH=100% align=""left"" valign=""top"">" & strDbDesc & "</td>"
  92.     strHTML = strHTML & "     </table>"
  93.     myNewCell.innerHTML = strHTML
  94.     Set myNewCell = nothing
  95.     Set myNewRow = nothing
  96.     Set theTable = nothing
  97. End Sub
  98.  
  99.  
  100. Sub GenerateBrowseSchemaRowDyn(iRowIndex, strSchemaName, strSchemaDesc, strSchemaGuid, strUniqueID)
  101.     Dim strHTML
  102.     Dim theTable
  103.     Dim myNewRow
  104.     Dim myNewCell
  105.     strSchemaName = MyHTMLEncode(strSchemaName)
  106.     strSchemaDesc = MyHTMLEncode(strSchemaDesc)
  107.  
  108.     Set theTable = document.all.item("browseTableTable")
  109.     Set myNewRow = theTable.insertRow(iRowIndex)
  110.     Call myNewRow.setAttribute("zzType", 2)
  111.     Set myNewCell = myNewRow.insertCell()
  112.     myNewCell.className = "DBTableText"
  113.     myNewCell.width = "70%"
  114.     myNewCell.vAlign = "top"
  115.     strHTML = ""
  116.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  117.     strHTML = strHTML & "      <tr>"
  118.     strHTML = strHTML & "        <td width=""35"" nowrap></td>"
  119.     strHTML = strHTML & "        <td class=""DBTableText"" width=""12"" id=""" & strUniqueID & """ nowrap><a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwOpen("" & strUniqueID & "")"">+</a></td>"
  120.     strHTML = strHTML & "        <td class=""DBTableText"" width=""24"" nowrap><img src=""repsch.gif""></td>"
  121.     strHTML = strHTML & "        <td class=""DBTableText"" valign=""center"">" & strSchemaName & "</td>"
  122.     strHTML = strHTML & "      </tr>"
  123.     strHTML = strHTML & "     </table>"
  124.     myNewCell.innerHTML = strHTML
  125.     Set myNewCell = nothing
  126.     Set myNewCell = myNewRow.insertCell()
  127.     myNewCell.vAlign = "top"
  128.     strHTML = ""
  129.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  130.     strHTML = strHTML & "         <td class=""DBTableText"" WIDTH=100% align=""left"" valign=""top"">" & strSchemaDesc & "</td>"
  131.     strHTML = strHTML & "     </table>"
  132.     myNewCell.innerHTML = strHTML
  133.     Set myNewCell = nothing
  134.     Set myNewRow = nothing
  135.     Set theTable = nothing
  136. End Sub
  137.  
  138.  
  139. Sub GenerateBrowseTableRowDyn(iRowIndex, strTableName, strTableDesc, strTableGuid, strUniqueID)
  140.     Dim strHTML
  141.     Dim theTable
  142.     Dim myNewRow
  143.     Dim myNewCell
  144.     Dim L_packageStr
  145.     Dim L_srcDestStr
  146.     strTableName = MyHTMLEncode(strTableName)
  147.     strTableDesc = MyHTMLEncode(strTableDesc)
  148.  
  149.     L_packageStr = GetResString(32)
  150.     L_srcDestStr = GetResString(33)
  151.     Set theTable = document.all.item("browseTableTable")
  152.     Set myNewRow = theTable.insertRow(iRowIndex)
  153.     Call myNewRow.setAttribute("zzType", 3)
  154.     Set myNewCell = myNewRow.insertCell()
  155.     myNewCell.className = "DBTableText"
  156.     myNewCell.width = "70%"
  157.     myNewCell.vAlign = "top"
  158.     strHTML = ""
  159.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"" border=""0"">"
  160.     strHTML = strHTML & "      <tr>"
  161.     strHTML = strHTML & "        <td width=""60"" nowrap></td>"
  162.     strHTML = strHTML & "        <td class=""DBTableText"" width=""12"" id=""" & strUniqueID & """ nowrap><a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwOpen("" & strUniqueID & "")"">+</a></td>"
  163.     strHTML = strHTML & "        <td class=""DBTableText"" width=""24"" nowrap><img src=""reptbl.gif""></td>"
  164.     strHTML = strHTML & "        <td class=""DBTableText"" valign=""center""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowTableProp("" & strTableName & "","" & strTableGuid & "")"">" & strTableName & "</a></td>"
  165.     strHTML = strHTML & "        <td class=""DBTableText"" valign=""center"" align=""right"">"
  166.     strHTML = strHTML & "          <table frame=""void"" cellspacing=""0"" cellpadding=""0"" border=""0"">"
  167.     strHTML = strHTML & "            <tr>"
  168.     strHTML = strHTML & "              <td class=""DBTableText"" valign=""center"" align=""right""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowSrcTgtPackageProp("" & strTableName & " " & L_packageStr & "","" & strTableGuid & "","table")"">" & L_packageStr &"</a>  <a class=""TableRowButton"" href language=""jscript"" onclick=""ShowSrcTgtMaps("" & strTableName & " " & L_srcDestStr & "","" & strTableGuid & "","table")"">" & L_srcDestStr & "</a></td>"
  169.     strHTML = strHTML & "            </tr>"
  170.     strHTML = strHTML & "             </table>"
  171.     strHTML = strHTML & "        </td>"
  172.     strHTML = strHTML & "      </tr>"
  173.     strHTML = strHTML & "     </table>"
  174.     myNewCell.innerHTML = strHTML
  175.     Set myNewCell = nothing
  176.     Set myNewCell = myNewRow.insertCell()
  177.     myNewCell.className = "DBTableText"
  178.     myNewCell.vAlign = "top"
  179.     strHTML = ""
  180.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  181.     strHTML = strHTML & "         <td class=""DBTableText"" WIDTH=100% align=""left"" valign=""top"">" & strTableDesc & "</td>"
  182.     strHTML = strHTML & "     </table>"
  183.     myNewCell.innerHTML = strHTML
  184.     Set myNewCell = nothing
  185.     Set myNewRow = nothing
  186.     Set theTable = nothing
  187. End Sub
  188.  
  189.  
  190. Sub GenerateBrowseColumnRowDyn(iRowIndex, strColName, strColDesc, strColumnGuid, strUniqueID)
  191.     Dim strHTML
  192.     Dim theTable
  193.     Dim myNewRow
  194.     Dim myNewCell
  195.     Dim L_packageStr
  196.     Dim L_srcDestStr
  197.     strColName = MyHTMLEncode(strColName)
  198.     strColDesc = MyHTMLEncode(strColDesc)
  199.  
  200.     L_packageStr = GetResString(32)
  201.     L_srcDestStr = GetResString(33)
  202.     Set theTable = document.all.item("browseTableTable")
  203.     Set myNewRow = theTable.insertRow(iRowIndex)
  204.     Call myNewRow.setAttribute("zzType", 4)
  205.     Set myNewCell = myNewRow.insertCell()
  206.     myNewCell.className = "DBTableText"
  207.     myNewCell.width = "70%"
  208.     myNewCell.vAlign = "top"
  209.     strHTML = ""
  210.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  211.     strHTML = strHTML & "      <tr>"
  212.     strHTML = strHTML & "        <td width=""85"" nowrap></td>"
  213.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" width=""12"" id=""" & strUniqueID & """ nowrap><a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwOpen("" & strUniqueID & "")"">+</a></td>"
  214.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" width=""24"" nowrap><img src=""repcol.gif""></td>"
  215.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" valign=""center""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowColumnProp("" & strColName & "","" & strColumnGuid & "")"">" & strColName & "</a></td>"
  216.     strHTML = strHTML & "        <td class=""DBHighlightedTableText"" valign=""center"" align=""right"">"
  217.     strHTML = strHTML & "          <table frame=""void"" cellspacing=""0"" cellpadding=""0"" border=""0"">"
  218.     strHTML = strHTML & "            <tr>"
  219.     strHTML = strHTML & "              <td class=""DBTableText"" valign=""center"" align=""right""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowSrcTgtPackageProp("" & strColName & " " & L_packageStr & "","" & strColumnGuid & "","column")"">" & L_packageStr & "</a>  <a class=""TableRowButton"" href language=""jscript"" onclick=""ShowSrcTgtMaps("" & strColName & " " & L_srcDestStr & "","" & strColumnGuid & "","column")"">" & L_srcDestStr & "</a></td>"
  220.     strHTML = strHTML & "            </tr>"
  221.     strHTML = strHTML & "             </table>"
  222.     strHTML = strHTML & "        </td>"
  223.     strHTML = strHTML & "      </tr>"
  224.     strHTML = strHTML & "     </table>"
  225.     myNewCell.innerHTML = strHTML
  226.     Set myNewCell = nothing
  227.     Set myNewCell = myNewRow.insertCell()
  228.     myNewCell.className = "DBHighlightedTableText"
  229.     myNewCell.vAlign = "top"
  230.     strHTML = ""
  231.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  232.     strHTML = strHTML & "         <td class=""DBTableText"" WIDTH=""100%"" align=""left"" valign=""top"">" & strColDesc & "</td>"
  233.     strHTML = strHTML & "     </table>"
  234.     myNewCell.innerHTML = strHTML
  235.     Set myNewCell = nothing
  236.     Set myNewRow = nothing
  237.     Set theTable = nothing
  238. End Sub
  239.  
  240.  
  241. Sub GenerateBrowseColumnDataRowDyn(iRowIndex, arrColDataValues, strColumnGuid)
  242.     Dim strHTML
  243.     Dim theTable
  244.     Dim myNewRow
  245.     Dim myNewCell
  246.     arrColDataValues(3) = MyHTMLEncode(arrColDataValues(3))
  247.     arrColDataValues(4) = MyHTMLEncode(arrColDataValues(4))
  248.     arrColDataValues(5) = MyHTMLEncode(arrColDataValues(5))
  249.     arrColDataValues(6) = MyHTMLEncode(arrColDataValues(6))
  250.     arrColDataValues(7) = MyHTMLEncode(arrColDataValues(7))
  251.  
  252.     Set theTable = document.all.item("browseTableTable")
  253.     Set myNewRow = theTable.insertRow(iRowIndex)
  254.     theTable.rows(iRowIndex-1).cells(1).rowSpan = 2        ' so the description will wrap
  255.     Call myNewRow.setAttribute("zzType", 5)
  256.     Set myNewCell = myNewRow.insertCell()
  257.     myNewCell.className = "DBTableText"
  258.     myNewCell.width = "70%"
  259.     myNewCell.vAlign = "top"
  260.     strHTML = ""
  261.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  262.     strHTML = strHTML & "      <tr>"
  263.     strHTML = strHTML & "        <td width=""110"" nowrap></td>"
  264.     strHTML = strHTML & "        <td align=""center"">"
  265.     strHTML = strHTML & "          <hr>"
  266.     strHTML = strHTML & "          <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  267.     strHTML = strHTML & "            <tr>"
  268.     strHTML = strHTML & "              <td width=""25%"" class=""DBTableText"" valign=""center"">" & GetResString(34) & "</td>"    'DataType
  269.     strHTML = strHTML & "              <td width=""18%"" class=""DBTableText"" valign=""center"">" & GetResString(35) & "</td>"    'Length
  270.     strHTML = strHTML & "              <td width=""15%"" class=""DBTableText"" valign=""center"">" & GetResString(36) & "</td>"    'Scale
  271.     strHTML = strHTML & "              <td width=""22%"" class=""DBTableText"" valign=""center"">" & GetResString(37) & "</td>" 'Precision
  272.     strHTML = strHTML & "              <td class=""DBTableText"" valign=""center"">" & GetResString(38) & "</td>"                'Nulls
  273.     strHTML = strHTML & "            </tr>"
  274.     strHTML = strHTML & "            <tr>"
  275.     strHTML = strHTML & "              <td width=""25%"" class=""DBTableText"" valign=""center"">" & arrColDataValues(3) & "</td>"
  276.     strHTML = strHTML & "              <td width=""18%"" class=""DBTableText"" valign=""center"">" & arrColDataValues(4) & "</td>"
  277.     strHTML = strHTML & "              <td width=""15%"" class=""DBTableText"" valign=""center"">" & arrColDataValues(5) & "</td>"
  278.     strHTML = strHTML & "              <td width=""22%"" class=""DBTableText"" valign=""center"">" & arrColDataValues(6) & "</td>"
  279.     strHTML = strHTML & "              <td class=""DBTableText"" valign=""center"">" & arrColDataValues(7) & "</td>"
  280.     strHTML = strHTML & "            </tr>"
  281.     strHTML = strHTML & "           </table>"
  282.     strHTML = strHTML & "          <hr>"
  283.     strHTML = strHTML & "        </td>"
  284.     strHTML = strHTML & "      </tr>"
  285.     strHTML = strHTML & "     </table>"
  286.     myNewCell.innerHTML = strHTML
  287.     Set myNewCell = nothing
  288.     'Set myNewCell = myNewRow.insertCell()
  289.     'myNewCell.vAlign = "top"
  290.     'strHTML = ""
  291.     'strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  292.     'strHTML = strHTML & "         <td class=""DBTableText"" WIDTH=100% align=""left"" valign=""top""> </td>"
  293.     'strHTML = strHTML & "     </table>"
  294.     'myNewCell.innerHTML = strHTML
  295.     Set myNewCell = nothing
  296.     Set myNewRow = nothing
  297.  
  298.     Set theTable = nothing
  299. End Sub
  300.  
  301.  
  302. Sub BrwOpen(strUniqueID)
  303.     Dim theItem
  304.     Dim theParentItem
  305.     Dim iType
  306.     Dim iRowIndex
  307.     Dim bRetVal
  308.  
  309.     if (AddToHistory(20, "", strUniqueID, "") = False) Then
  310.         Exit Sub
  311.     end if
  312.     ' change the icon
  313.     Set theItem = document.all.item(strUniqueID)
  314.     theItem.innerHTML = "<a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwClose("" & strUniqueID & "")"">-</a>"
  315.     'theItem.style.cursor = "wait"
  316.     'theItem.children(0).style.cursor = "wait"
  317.  
  318.     ' find the row that contains this item.  To do this go up through parentElements and find the element whos zzType attribute is set
  319.     Do Until IsNull(theItem)
  320.         iType = theItem.getAttribute("zzType")
  321.         if Not IsNull(iType) then
  322.             Exit Do
  323.         end if
  324.         Set theParentItem = theItem.parentElement
  325.         Set theItem = nothing
  326.         Set theItem = theParentItem
  327.         Set theParentItem = nothing
  328.     Loop
  329.     iRowIndex = theItem.rowIndex
  330.  
  331.     errorspan.style.display = "none"
  332.     ' now we can add rows depending on the type
  333.     Select Case iType
  334.         Case 1    bRetVal = BrwAddSchemas(iRowIndex, strUniqueID)
  335.         Case 2    bRetVal = BrwAddTables(iRowIndex, strUniqueID)
  336.         Case 3    bRetVal = BrwAddColumns(iRowIndex, strUniqueID)
  337.         Case 4    bRetVal = BrwAddColumnData(iRowIndex, strUniqueID)
  338.         Case 10    bRetVal = BrwAddVersions(iRowIndex, strUniqueID)
  339.         Case 11    bRetVal = BrwAddLineages(iRowIndex, strUniqueID)
  340.     End Select
  341.     if bRetVal = "false" then
  342.         Set theItem = document.all.item(strUniqueID)
  343.         theItem.innerHTML = "<a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwOpen("" & strUniqueID & "")"">+</a>"
  344.     end if
  345.     Set theItem = nothing
  346. End Sub
  347.  
  348.  
  349. Sub BrwClose(strUniqueID)
  350.     Dim theItem
  351.     Dim theTable
  352.     Dim theParentItem
  353.     Dim iType
  354.     Dim iType2
  355.     Dim iRowIndex
  356.     Dim iNum
  357.     Dim iMax
  358.  
  359.     if (AddToHistory(21, "", strUniqueID, "") = False) Then
  360.         Exit Sub
  361.     end if
  362.     ' change the icon
  363.     Set theItem = document.all.item(strUniqueID)
  364.     theItem.innerHTML = "<a class=""TableRowButtonPlain"" href language=""jscript"" onclick=""BrwOpen("" & strUniqueID & "")"">+</a>"
  365.  
  366.     ' find the row that contains this item.  To do this go up through parentElements and find the element whos zzType attribute is set
  367.     Do Until IsNull(theItem)
  368.         iType = theItem.getAttribute("zzType")
  369.         if Not IsNull(iType) then
  370.             Exit Do
  371.         end if
  372.         Set theParentItem = theItem.parentElement
  373.         Set theItem = nothing
  374.         Set theItem = theParentItem
  375.         Set theParentItem = nothing
  376.     Loop
  377.     iRowIndex = theItem.rowIndex
  378.     if (iType = 4) then
  379.         theItem.cells(1).rowSpan = 1        ' so the description will wrap
  380.     End if
  381.     Set theItem = nothing
  382.  
  383.     if (iType > 9) then
  384.         Set theTable = document.all.item("PackBrowseTableTable")
  385.     else
  386.         Set theTable = document.all.item("browseTableTable")
  387.     end if
  388.  
  389.     errorspan.style.display = "none"
  390.     ' delete all the rows util we have a row of the same type or higher
  391.     iNum = iRowIndex + 1
  392.     iMax = theTable.rows.length
  393.     Do While iNum < iMax
  394.         iType2 = theTable.rows(iRowIndex+1).getAttribute("zzType")
  395.         if (iType2 <= iType) then
  396.             Exit Do
  397.         End if
  398.         theTable.deleteRow(iRowIndex+1)
  399.         iNum = iNum + 1
  400.     Loop
  401.     Set theTable = nothing
  402. End Sub
  403.  
  404.  
  405. Function BrwAddSchemas(iRowIndex, strUniqueID)
  406.     Dim strGuid
  407.     Dim arrItems()
  408.     Dim iMax
  409.     Dim iNum
  410.  
  411.     ' the right 49 characters of the strUniqueID is the GUID
  412.     strGuid = Right(strUniqueID, 49)
  413.  
  414.     Call findSchemaGuids(arrItems, strGuid)
  415.     iMax = UBound(arrItems) - 1
  416.     if iMax >= 20 then
  417.         if (MsgBox(GetResString(70), vbYesNoCancel, GetResString(71)) <> vbYes) then
  418.             BrwAddSchemas = "false"
  419.             Exit Function
  420.         end if
  421.     end if
  422.     For iNum = 0 to iMax
  423.         Call getSchemaNameDesc(strName, strDesc, arrItems(iNum))
  424.         strUniqueID = strUniqueID & arrItems(iNum)    ' make a unique id by adding our GUID
  425.         Call GenerateBrowseSchemaRowDyn(iRowIndex+1+iNum, strName, strDesc, arrItems(iNum), strUniqueID)
  426.     Next
  427.     BrwAddSchemas = "true"
  428. End Function
  429.  
  430.  
  431. Function BrwAddTables(iRowIndex, strUniqueID)
  432.     Dim strGuid
  433.     Dim arrItems()
  434.     Dim iMax
  435.     Dim iNum
  436.  
  437.     ' the right 49 characters of the strUniqueID is the GUID
  438.     strGuid = Right(strUniqueID, 49)
  439.  
  440.     Call findTableGuids(arrItems, strGuid)
  441.     iMax = UBound(arrItems) - 1
  442.     if iMax >= 20 then
  443.         if (MsgBox(GetResString(70), vbYesNoCancel, GetResString(71)) <> vbYes) then
  444.             BrwAddTables = "false"
  445.             Exit Function
  446.         end if
  447.     end if
  448.     For iNum = 0 to iMax
  449.         Call getTableNameDesc(strName, strDesc, arrItems(iNum))
  450.         strUniqueID = strUniqueID & arrItems(iNum)    ' make a unique id by adding our GUID
  451.         Call GenerateBrowseTableRowDyn(iRowIndex+1+iNum, strName, strDesc, arrItems(iNum), strUniqueID)
  452.     Next
  453.     BrwAddTables = "true"
  454. End Function
  455.  
  456.  
  457. Function BrwAddColumns(iRowIndex, strUniqueID)
  458.     Dim strGuid
  459.     Dim arrItems()
  460.     Dim iMax
  461.     Dim iNum
  462.  
  463.     ' the right 49 characters of the strUniqueID is the GUID
  464.     strGuid = Right(strUniqueID, 49)
  465.  
  466.     Call findColumnGuids(arrItems, strGuid)
  467.     iMax = UBound(arrItems) - 1
  468.     if iMax >= 20 then
  469.         if (MsgBox(GetResString(70), vbYesNoCancel, GetResString(71)) <> vbYes) then
  470.             BrwAddColumns = "false"
  471.             Exit Function
  472.         end if
  473.     end if
  474.     For iNum = 0 to iMax
  475.         Call getColumnNameDesc(strName, strDesc, arrItems(iNum))
  476.         strUniqueID = strUniqueID & arrItems(iNum)    ' make a unique id by adding our GUID
  477.         Call GenerateBrowseColumnRowDyn(iRowIndex+1+iNum, strName, strDesc, arrItems(iNum), strUniqueID)
  478.     Next
  479.     BrwAddColumns = "true"
  480. End Function
  481.  
  482.  
  483. Function BrwAddColumnData(iRowIndex, strUniqueID)
  484.     Dim arrColDataValues()
  485.     Dim strGuid
  486.  
  487.     ' the right 49 characters of the strUniqueID is the GUID
  488.     strGuid = Right(strUniqueID, 49)
  489.  
  490.     Call getColumnProps(arrColDataValues, strGuid)
  491.     Call GenerateBrowseColumnDataRowDyn(iRowIndex+1, arrColDataValues, strGuid)
  492.     BrwAddColumnData = "true"
  493. End Function
  494.